
install(DIRECTORY ${PROJECT_SOURCE_DIR}/python DESTINATION .)

install(FILES ${PROJECT_SOURCE_DIR}/FfMediaInfo/include/FfMediaInfo.h DESTINATION .)
install(FILES ${PROJECT_SOURCE_DIR}/README.md DESTINATION .)


if(WIN32)
	install(DIRECTORY ${FFMPEG_LIBRARY_DIR}/ DESTINATION . FILES_MATCHING PATTERN "*.dll")
else()
	install(DIRECTORY ${THIRD_PARTY}/ffmpeg/lib/ DESTINATION . FILES_MATCHING PATTERN "*.so")
endif()


set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION .)
include(InstallRequiredSystemLibraries)

#set(CPACK_PACKAGE_DIRECTORY ${PROJECT_ROOT})
set(CPACK_PACKAGE_NAME "FfMediaInfo")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "FfMediaInfo")
set(CPACK_PACKAGE_VENDOR "www.100wits.com")
set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "2")

if(UNIX)
	SET(CPACK_GENERATOR "TGZ")
else()
	SET(CPACK_GENERATOR "ZIP")
endif()

set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/dist")

if(CMAKE_CL_64)
	set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-x64") 
else()
	set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-x86") 
endif()

include(CPack)
